#ifndef FTSHOWTEXT_H
#define FTSHOWTEXT_H

#include "rotatingdialog.h"
#include <QtGui>
#include <QtWebKit>

class FTPushButton;
class FTLabel;

class FTShowText : public RotatingDialog
{
    Q_OBJECT
public:
    explicit FTShowText(const QString&, const QString&, QWidget *parent = 0);

    void paintEvent(QPaintEvent *);

    void mousePressEvent(QMouseEvent *);
    void mouseReleaseEvent(QMouseEvent *);
    void mouseMoveEvent(QMouseEvent *);

private slots:
    void contentsChanged(QSize);

private:
    void buildWidgets(const QString&);
    void buildText(const QString&);

    QWebPage page;

    FTLabel* titleLabel;
    FTPushButton* closeButton;

    int scroll_pos;
    int mouse_start;

    virtual QLayout* createVertical();

};

#endif // FTSHOWTEXT_H
